﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TicketM.Configuration
{
    public partial class ProjectSelection : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Models.Tickets ticketing = new Models.Tickets();
            ArrayList projects = ticketing.ProjectsWithTicketing();
            foreach (string project in projects)
            {
                projectsList.Items.Add(project);
            }
        }

        protected void SelectProject_Click(object sender, EventArgs e)
        {
            string sProject = this.projectsList.SelectedItem.Value;
            Session.Add("sProject",sProject );
            Response.Redirect(Session["refPage"].ToString());
        }
    }
}